package com.sunnada.edu.system.quartz.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sunnada.edu.system.pub.dao.BaseDaoImpl;


@Repository
public class QuartzDaoImpl extends BaseDaoImpl implements QuartzDao {

	public int findQuartzCot(HashMap<String, String> param) {
		List l = selectList("quartz_sqlmap.findQuartzCot", param);
		if (l != null) {
			Map m = (Map) l.get(0);
			return Integer.valueOf("" + m.get("cot"));
		}
		return 0;
	}

	public List findQuartzs(HashMap<String, String> param) {
		return selectList("quartz_sqlmap.findQuartzs", param);
	}

	 
	public int quartzUpdate(HashMap<String, String> param) {
		return update("quartz_sqlmap.quartzUpdate",param);
	}

	public List getQuartz(HashMap<String, String> param) {
		return selectList("quartz_sqlmap.getQuartz", param);
	}

    @Override
    public void pauseJob(HashMap<String, String> params) {
        update("quartz_sqlmap.pauseJob",params);
        
    }

    @Override
    public void resumeJob(HashMap<String, String> params) {
        update("quartz_sqlmap.pauseJob",params);
        
    }
	 
}
